# 1. datetime
from datetime import datetime
now = datetime.now()
print(now)
dt = datetime(2018, 1, 31, 20, 21)
print(dt.timestamp())
print(dt)

t = 1429417200.0
print(datetime.fromtimestamp(t))


# 2. base64
import base64
print(base64.b64encode(b'binary\x00string'))
# b'YmluYXJ5AHN0cmluZw=='
print(base64.b64decode(b'YmluYXJ5AHN0cmluZw=='))

